import React, { Component } from 'react'
import { Provider } from 'react-redux'
import { createAppContainer, createStackNavigator } from 'react-navigation'

import store from './store/store'
import frameworks from './pages/frameworks/main'
import routeNames from './utils/routeNames'
import PlayDetail from './pages/singlePages/playDetail/playDetail'

const navigator = createStackNavigator({
  frameworks: {
    screen: frameworks,
    navigationOptions: {
      header: null
    }
  },
  [routeNames.playDetail]: PlayDetail
})

const Container = createAppContainer(navigator)

export default class App extends Component {
  render() {
    return (
      <Provider store={store}>
        <Container/>
      </Provider>
    )
  }
}